Public Class Form3

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.Visible = False
        Form1.Visible = True
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Label2.Text = Int(Rnd() * 10)
        Label3.Text = Int(Rnd() * 10)
        Label4.Text = Int(Rnd() * 10)

        'If Label2.Text = "7" Or Label3.Text = "7" Or Label4.Text = "7" Then
            'PictureBox1.Visible = True
        'Else
            'PictureBox1.Visible = False
        'End If
        If Label2.Text = "7" And Label3.Text = "7" Then
            PictureBox1.Visible = True
        ElseIf Label2.Text = "7" And Label4.Text = "7" Then
            PictureBox1.Visible = True
        ElseIf Label3.Text = "7" And Label4.Text = "7" Then
            PictureBox1.Visible = True
        Else
            PictureBox1.Visible = False
        End If
    End Sub
End Class